A camera can be fixed at an upper end of an electronic device and protrude from the surface of the electronic device housing. When the camera lens is not used, the camera lens may still protrude from the surface of the housing, which may expose the camera lens to be damaged.